<%@ Control Language="C#" AutoEventWireup="true" CodeFile="forumgrid.ascx.cs" Inherits="forums_controls_forums_forumgrid" %>
<%@ Register Src="../threads/LastThread.ascx" TagName="LastThread" TagPrefix="uc1" %>
<asp:GridView runat="server" ID="gridForums" Width="100%" AutoGenerateColumns="false" GridLines="None">
    <Columns>
        <asp:TemplateField>
            <HeaderTemplate>Forum</HeaderTemplate>
            <ItemTemplate>
                <asp:HyperLink runat="server" ID="lnkForum"
                    Text='<%# Helpers.StringHelper.SafeFormat(Eval("Name").ToString()) %>'
                    NavigateUrl='<%# Forum.SiteSettings.GetRelativePath(Helpers.StringHelper.SafeFormat("forum.aspx?f={0}", Eval("ID"))) %>'/><br />
                <asp:Label runat="server" ID="lblDescription"
                    Text='<%# Helpers.StringHelper.SafeFormat(Eval("Description")) %>' />
            </ItemTemplate>
            <HeaderStyle CssClass="forum_primary_header" />
        </asp:TemplateField>
        <asp:BoundField DataField="TotalThreads" HeaderText="Threads" >
            <HeaderStyle CssClass="forum_secondary_header" />
            <ItemStyle CssClass="forum_secondary_item" />
        </asp:BoundField>
        <asp:BoundField DataField="TotalPosts" HeaderText="Posts" >
            <HeaderStyle CssClass="forum_secondary_header" />
            <ItemStyle CssClass="forum_secondary_item" />
        </asp:BoundField>
        <asp:TemplateField>
            <HeaderTemplate>Last Post</HeaderTemplate>
            <ItemTemplate>
                <uc1:LastThread id="LastThread1" runat="server" CurrentThread='<%# Eval("LastThread") %>'>
                </uc1:LastThread>
            </ItemTemplate>
            <HeaderStyle CssClass="forum_secondary_header" />
        </asp:TemplateField>
    </Columns>
    <EmptyDataTemplate>
       There aren't any forums on this site. Oh noes!
    </EmptyDataTemplate>
    <AlternatingRowStyle CssClass="forum_altgridrow" />
</asp:GridView>